import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

public class MyServlet extends HttpServlet {

     private static final long serialVersionUID = 2378494112650465478L;

     protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
         doPost(req, resp);
     }

     protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
         System.out.println("UndertowServletServer" + Thread.currentThread().getName());
         PrintWriter writer = resp.getWriter();
         writer.write("<p style='color:red;text-align:center;'>"+this.getInitParameter("message")+"</p>");
         writer.close();
     }

}
